package com.topboya.officeuser.controller.parse.read;

import com.topboya.officeuser.controller.parse.constLocation.KeyConst;
import com.topboya.officeuser.controller.parse.util.HttpUtils;
import com.topboya.officeuser.utils.HttpClientUtils;

import java.io.IOException;
import java.net.URLEncoder;
import java.text.ParseException;

/**
 * @className TencentRead
 * @Author xiaxin
 * @Date 2020/12/31 16:24
 * @Version 1.0
 **/
public class TencentRead {

    public String getLocation(String address) throws Exception {

        String trimAddress = address.replaceAll(" ","");
        String url = "https://apis.map.qq.com/ws/geocoder/v1/";
        String content = HttpUtils.sendGet(url, "address=" + trimAddress + "&key=" + KeyConst.TENCENT_KEY);


        return content;
    }

}
